﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Admin.ViewModels.ProviderViewModels>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%@ Import Namespace="SDT.Admin.ViewModels" %>
<%@ Import Namespace="SDT.Model"%>
<asp:Content ID="Content3" ContentPlaceHolderID="TitleContent" runat="server">
	Sửa thông tin nhà cung cấp
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Toolbar" runat="server">	
    <%= Html.Toolbar("Thêm mới", "/Provider/Create", "new")%>	
	<%= Html.Toolbar("Quay lại", "/Provider", "back")%>	
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Header" runat="server">
	Sửa thông tin nhà cung cấp
</asp:Content>

<asp:Content ID="Content6" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["Message"] != null ? "<p class='perror'>" + Html.Encode(ViewData["Message"]) + "</p>" : string.Empty%>  
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">   
    <% using (Html.BeginForm("Edit", "Provider", FormMethod.Post, new {id="EditForm", enctype = "multipart/form-data" }))
            {%>
        <%= Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Sửa thông tin nhà cung cấp</legend>
            <div class="editor-label">
                Tên nhà cung cấp
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Provider.Name,new { @class = "required",style = "width:400px;"}) %>
            </div>
            
            <div class="editor-label">
                Địa chỉ
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Provider.Address, new { @class = "required", style = "width:400px;" })%>
            </div>
            
            <div class="editor-label">
                Điện thoại
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Provider.Phone) %>
            </div>
            
            <div class="editor-label">
                Fax
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Provider.Fax) %>
            </div>
            
            <div class="editor-label">
               Email
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Provider.Email) %>
            </div>            
            <div class="editor-label">
                Logo công ty
            </div>
            <div class="editor-field">
                <input id="fileLogo" name="fileLogo" type="file" size="30" />  
            </div>
            
            <div class="editor-label">
                Giới thiệu công ty
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.Provider.Introduction, new { style = "width:400px; height=50px;" })%>                
            </div>
            <div class="editor-field">
                <input type="submit" value="Lưu dữ liệu" />
            </div>
        </fieldset>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#EditForm").validate();
            });
        </script>
    <% } %>
</asp:Content>
